<template>
  <el-form ref="form" :model="formData" label-width="100px" style="width: 100%;">
    <el-collapse v-model="formData.activeName" accordion>
      <el-collapse-item name="1">
        <template v-slot:title>
          <i class="header-icon el-icon-bangzhu" style="margin-left: 10px;font-weight: bold;color: #6c6c6c;"><span style="font-weight: bold;color: #6c6c6c;"> 基本信息</span></i>
        </template>
        <el-form-item>
          <span slot="label">
            <el-tooltip content="必须以字母或者_作为开头，只能存在字母、数字、_ 和 -，单个流程内的必须唯一" placement="left">
              <i class="el-icon-question" />
            </el-tooltip>
            节点key
          </span>
          <el-input v-model="formData.id" size="mini" />
        </el-form-item>
        <el-form-item label="节点名称">
          <el-input v-model="formData.name" size="mini" />
        </el-form-item>
        <el-form-item label="节点描述">
          <el-input v-model="formData.desc" type="textarea" size="mini" />
        </el-form-item>
      </el-collapse-item>
    </el-collapse>
    <el-collapse accordion>
      <el-collapse-item>
        <template v-slot:title>
          <i class="header-icon el-icon-headset" style="margin-left: 10px;font-weight: bold;color: #6c6c6c;"><span style="font-weight: bold;color: #6c6c6c;"> 监听器</span></i>
        </template>
      </el-collapse-item>
    </el-collapse>
    <el-collapse accordion>
      <el-collapse-item>
        <template v-slot:title>
          <i class="header-icon el-icon-position" style="margin-left: 10px;font-weight: bold;color: #6c6c6c;"><span style="font-weight: bold;color: #6c6c6c;"> 扩展属性</span></i>
        </template>
      </el-collapse-item>
    </el-collapse>
  </el-form>
</template>

<script>

export default {
  name: 'SequenceFlowPanel',
  components: {},
  directives: {},
  filters: {},
  // props属性
  props: {
    // modeler: {
    //   type: Object,
    //   required: false
    // },
    // element: {
    //   type: Object,
    //   required: false
    // }
  },
  data() {
    return {
      formData: {
        activeName: '1',
        id: this.element.businessObject.id ? this.element.businessObject.id : '',
        name: this.element.businessObject.name ? this.element.businessObject.name : '',
        desc: this.element.businessObject.documentation ? this.element.businessObject.documentation[0].text : ''
      }
    }
  },
  // 生命周期 - 创建完成（可以访问当前this实例）
  created() {},
  // 生命周期 - 载入后, Vue 实例挂载到实际的 DOM 操作完成，一般在该过程进行 Ajax 交互
  mounted() {},
  methods: {

  }
}
</script>

<style>
.el-form-item{
  margin-bottom: 5px;
}

/* 给展开的标题添加下划线 */
.el-collapse-item__header {
  height: 35px;
  line-height: 35px;
}

.el-collapse-item__header.is-active {
  border-bottom: 1px solid rgba(222, 217, 217, 0.7); /* 您可以根据需要调整下划线的颜色和样式 */
  height: 35px;
  line-height: 35px;
}
</style>
